/**
 * 
 */
package com.gragra.benchmark.tests;
import static org.junit.Assert.*;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.StringReader;
import java.io.StringWriter;
import org.junit.Before;
import org.junit.Test;
import com.gragra.benchmark.RunBinaryMultipleTimes;
/**
 * @author Christoph Teichmann
 * 21.09.2013
 */
public class TestRunBenchmarkMultipleTimes
{
	/**
	 * 
	 */
	private StringWriter sw;
	/**
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception
	{
		sw = new StringWriter();
		BufferedWriter bw = new BufferedWriter(sw);
		StringReader sr = new StringReader("this|0 is|1 the|2 sentence|3\nwhat|0 what|1 what|2");
		BufferedReader sents = new BufferedReader(sr);
		sr = new StringReader("0;4 0;2 2;4\n0;4 1;4 2;4\n0;3 0;2\n0;3 1;3");
		BufferedReader golds = new BufferedReader(sr);
		sr = new StringReader("20 10 0.01 5.0 1 10 3\n50 15 17.0 8.0 5 100 7");
		BufferedReader paras = new BufferedReader(sr);
		new RunBinaryMultipleTimes(sents, golds, paras, bw);
		bw.close();
	}
	/**
	 * Test method for {@link com.gragra.benchmark.RunBenchmarkMultipleTimes#RunBenchmarkMultipleTimes(java.io.BufferedReader, java.io.BufferedReader, java.io.BufferedReader, java.io.BufferedWriter)}.
	 */
	@Test
	public void testRunBenchmarkMultipleTimes()
	{
		String[] parts = (sw.toString()).split("\n");
		assertEquals(parts.length,43);
	}
}